<template>
  <div class="warp">
    <div>
      <pageWangEditor
        @editorHtml="editorHtml"
        :goodsDetails="vuexText"
      ></pageWangEditor>
    </div>
  </div>
</template>

<script>
import { reactive, toRefs, onMounted, computed } from "vue";
import axios from "@/utils/axios";
import { useStore } from "vuex";
import pageWangEditor from "@/components/WangEditor.vue"; //富文本编辑
export default {
  name: "Index",
  components: {
    pageWangEditor,
  },
  setup() {
    const store = useStore();
    const state = reactive({
      vuexText: computed(() => store.state.vuexText), //vuex调用
    });

    onMounted(() => {});

    //富文本内容回调
    const editorHtml = async (e) => {
      // console.log(e,"富文本内容");
    };

    return {
      ...toRefs(state),
      editorHtml, //富文本内容回调
    };
  },
};
</script>

<style lang="scss" scoped>
.warp {
}
</style>